<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		
		<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
		<link rel='stylesheet' href='css/main2.css' type='text/css'>
		<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
 		<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
		<meta name="viewport" content="width=device-width; initial-scale=1.0" />
		<script type="text/javascript" src='http://apis.daum.net/maps/maps3.js?apikey=44d018ccd28d54cfc3e376a6c2a2068976a88fb0'></script>

<style>

#map {
	width: 100%;
	height: 100%;
	border: 1px;
}
</style>		
			 
	</head>

<!-- 	<body onload="initialize()"> -->
	<body>
		<div id='pageDiv' data-role="page"  data-theme="b">
			
			<header data-tap-toggle="false" data-position="fixed" data-role="header" role="banner">
				
				<a href="#menuPanel" data-role="button" data-icon="bars" data-iconpos="notext" data-theme="a" data-inline="true">Bars</a>
				
				<h1 id="centerheader">
				</h1>
				<h5>${sessionScope.userLoginInfo.name}님 환영합니다.</h5>
				<a href="#rightpanel" data-role="button" data-icon="grid" data-iconpos="notext" data-theme="a" data-inline="true">Grid</a>
				
			</header>
							
			
			
			<section id="menuPanel" data-display="overlay" data-position-fixed="true" data-role="panel"  data-theme="b">
			<div class="ui-panel-inner" ><nav class="main-nav">
				<ul class="menupanel_one">
					<li>
					<a href="main" data-lid="home" class="ui-link active">MAIN</a>
					</li>
					
					<li>
					<a data-lid="vehicles" class="ui-link">업무보고</a>
					</li>
						<ul class="menupanel_two">
							<li>
								<a href="reportingregist" data-lid="mobile_apps" class="ui-link">등 록</a>
							</li>
							<li>
								<a href="todayreporting" data-lid="mobile_apps" class="ui-link">일일업무</a>
							</li>
							<li>
								<a href="weekreporting" data-lid="mobile_apps" class="ui-link">주간업무</a>
							</li>
							<li>
								<a href="monthreporting" data-lid="mobile_apps" class="ui-link">월간업무</a>
							</li>
						</ul>
					<li>
						
					<a data-lid="vehicles" class="ui-link">회의록</a>
					
					</li>
						<ul class="menupanel_two">
							<li>
								<a href="reportingregist" data-lid="mobile_apps" class="ui-link">등 록</a>
							</li>
							<li>
								<a href="todayreporting" data-lid="mobile_apps" class="ui-link">지난 회의록</a>
							</li>
						</ul>
				
					<li>
						<a data-lid="mobile_apps" class="ui-link">거래처 관리</a>
					</li>
						<ul class="menupanel_two">
							<li>
								<a href="accountlist" data-lid="mobile_apps" class="ui-link">거래처 보기</a>
							</li>
							<li>
								<a href="accountregist" data-lid="mobile_apps" class="ui-link">거래처 등록</a>
							</li>							
						</ul>
					
					<li>
						<a href="location" data-lid="owner_site" >팀원 위치 보기</a>
					</li>
					
					<li>
						<a href="#companybbs" data-lid="owner_site" >사내 게시판</a>
					</li>
						
					<li>
						<a data-lid="owner_site" >PT</a>
					</li>
						<ul class="menupanel_two">
							<li>
								<a href="ptregist" data-lid="mobile_apps" class="ui-link">등 록</a>
							</li>
							<li>
								<a href="ptview" data-lid="mobile_apps" class="ui-link">보 기</a>
							</li>							
						</ul>
					
				</ul>
				</nav></div>
			</section>	
			
			
					
			<div data-role="panel" id="rightpanel" data-display="overlay" data-position="right" data-theme="b">
				
			</div>
			
			
			
			
			<table border="1" align="center" width="300" height="200">
			    <caption> 거래처 상세</caption>
				   <thead>
				      <tr>
				         <th>${aVO.regdate}</th>
				         <th>${aVO.state}</th>
				      </tr>
				   </thead>
				   <tfoot>

		 		 </tfoot>
				 	<tbody>
					    <tr>
					      <td colspan="2">관리 사원 이름 : ${aVO.epId}</td>
					    </tr>
					    <tr>
					      <td colspan="2">관리 사원 전화 번호 :${aVO.phoneNum}</td>
					    </tr>
					    <tr>
					      <td colspan="2">회사 코드 : ${aVO.accountCode}</td>
					    </tr>
					    <tr>
					      <td colspan="2">회사 이름 : ${aVO.accountName}</td>
					    </tr>
					    <tr>
					      <td colspan="2">사업자 번호 : ${aVO.companyCode}</td>
					    </tr>
					    <tr>
					      <td colspan="2">주소 : ${aVO.addr1}${aVO.addr2}</td>
					    </tr>
					    <tr>
					      <td colspan="2">우편 번호 : ${aVO.zipCode}</td>
					    </tr> 
					    <tr>
					      <td colspan="2">회사 전화 번호 : ${aVO.phoneNum}</td>
					    </tr>
					    <tr>
					       <td colspan="2">관리자 이름 : ${aVO.personName}</td>
					    </tr>
					    <tr>
					       <td colspan="2">관리자 전화번호 : ${aVO.personNum}</td>
					    </tr>
				        <tr>
				           <td colspan="2" width="300" height="300" >
				             <div id='map'></div>
				           </td>
				            
				        </tr>
					</tbody>
				</table>
		
				<form id='mapvalue'>
					<input id='lat' type='hidden' name='page' value=${aVO.latitude }>
					<input id='lon' type='hidden' name='page' value=${aVO.longitude }>
					<input id='accountCode' type='hidden' name='accountCode' value=${aVO.accountCode}> 
				</form>	
				
				<a href="#popupLogin" data-rel="popup" data-position-to="window" data-role="button" data-inline="true" data-icon="check" data-theme="a" data-transition="flip">댓 글 쓰 기</a>
					
					<div data-role="popup" id="popupLogin" data-theme="b" class="ui-corner-all" data-ajac="flase">
					    <form>
					        <div style="padding:10px 20px;">
					            <h3>댓 글 쓰 기 </h3>
					            <div data-role="fieldcontain" class="ui-hide-label">
				        			<textarea style="width: 300px; height: 250px; " name="reply" id="reply"></textarea>
				      			  </div>
					            <a data-theme="b" data-icon="check" id="replyRegist">댓 글 등 록</a>
					        </div>
					    </form>
					</div>
						
				
				<div id='replylist'></div>
				
		</div>			
					
		<script>


		 function onPositionUpdate(position){
					
			console.log("ccccccccccccccccccccccccccccccc");	

			console.log("zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz");
					  
		}
				
		var map;				
			
		function initMap(){ 
			
			console.log("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
			
			navigator.geolocation.getCurrentPosition(
			  function(position) {
				 //좌표설정 
				 var position = new daum.maps.LatLng($('#lat').val(), $('#lon').val());
				 console.log(position); 
				 
				 map = new daum.maps.Map(document.getElementById('map'), {
					center: position,
					level: 5
				 });
				 
				  var marker = new daum.maps.Marker({
				  	position: position 
			      }); 
				  marker.setMap(map); 
				
				  infowindow.open(map, marker);   
				  
				 

			});
					      
		}
		
	
		
		initMap();  	
			
			 
		function replylist(){
				
			console.log("replylist..........");
				 
				$.get('accountReplyAction', { "accountCode" : $('#accountCode').val() } ).done(function(data){
					
					console.log("111!!");
				if (data.length > 0) {
							
					console.log("success!!");
						
					replylistload(data);
					
				} else { 
						
					console.log("fail!");
							
						
			 		return;
						
				}
				
			});
				
		}
				
			 
		function replylistload(data){
					
			console.log("Aaaaaaaaaaaaaaaa");
			console.log(data);
				
			
		}
			
		$('#replyRegist').click(function(){
			

			console.log("aaaaa");
			
		});
			
		
		
			 
		</script>
		
	</body>
</html>























